package nicg.st.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import nicg.st.entity.IndicatorDataDetail;
import nicg.st.entity.ResultList;
import nicg.st.entity.SchemeList;

@Mapper
public interface ResultMapper {

	List<SchemeList> findScheme();

    int findSchemeSum();

    int findSchemeSearchSum(@Param("startTime")String startTime,@Param("endTime")String endTime);
    int findSchemeSearchNameSum(@Param("searchName")String searchName);
    int findSchemeSearchAllSum(@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("searchName")String searchName);
    List<SchemeList> findSchemeSearchByPage(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("offset") int offset, @Param("limit") int limit);
    List<SchemeList> findSchemeSearchNameByPage(@Param("searchName") String searchName,@Param("offset") int offset, @Param("limit") int limit);
    List<SchemeList> findSchemeSearchAllByPage(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("searchName") String searchName,@Param("offset") int offset, @Param("limit") int limit);
    List<SchemeList> findSchemeByPage(@Param("offset") int offset, @Param("limit") int limit);
    String selectIndicatorPathBySchemeId(@Param("schemeId")int schemeId);
    
    String selectIndicatorNameId(int id);
    
    SchemeList findSchemeById(@Param("id") int id);

    List<IndicatorDataDetail> findIndicatorBySchemeId(@Param("SchemeId") int SchemeId);

    List<IndicatorDataDetail> findLevelTwo(@Param("SchemeId") int SchemeId);

    List<IndicatorDataDetail> findLevelThree(@Param("SchemeId") int SchemeId);

    List<IndicatorDataDetail> buildBar(@Param("SchemeId") int SchemeId, @Param("levelOne") String levelOne);

    void deleteScheme(@Param("SchemeId") int id);

    void deleteSchemeDetail(@Param("SchemeId") int id);
    
    String getDeviate(@Param("schemeId") int schemeId);

}
